<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8" />
  <title>opencpn:opencpn_user_manual:getting_started:opencpn_installation:linux</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="opencpn,opencpn_user_manual,getting_started,opencpn_installation,linux"/>
<link rel="search" type="application/opensearchdescription+xml" href="../../lib/exe/opensearch.html" title="OpenCPN Manuals"/>
<link rel="start" href="linux.html"/>
<link rel="contents" href="linux.html" title="Sitemap"/>
<link rel="alternate" type="application/rss+xml" title="Recent Changes" />
<link rel="alternate" type="application/rss+xml" title="Current namespace" />
<link rel="alternate" type="text/html" title="Plain HTML" href="linux.html"/>
<link rel="alternate" type="text/plain" title="Wiki Markup" href="linux.html"/>
<link rel="canonical" href="http://localhost/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:getting_started:opencpn_installation:linux"/>
<link rel="stylesheet" type="text/css" href="../../lib/exe/css.php.t.bootstrap3.css"/>
<!--[if gte IE 9]><!-->
<script type="text/javascript">/*<![CDATA[*/var NS='opencpn:opencpn_user_manual:getting_started:opencpn_installation';var JSINFO = {"id":"opencpn:opencpn_user_manual:getting_started:opencpn_installation:linux","namespace":"opencpn:opencpn_user_manual:getting_started:opencpn_installation","confirm_delete":"Are you sure you want to delete this page?","doku_base":"\/dokuwiki\/","cg_rev":"","dw_version":49.5,"chrome_version":0,"hide_captcha_error":"none","ckg_dbl_click":"","ckg_canonical":0,"has_wrap":"Wrap","wrapDiv":"WRAP","wrapSpan":"wrap","ckgEdPaste":"off","rel_links":0,"isadmin":0,"isauth":0,"move_renameokay":false,"schemes":["http","https","telnet","gopher","wais","ftp","ed2k","irc","ldap"],"htmlok":0};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="../../lib/exe/jquery.php.t.bootstrap3.js"></script>
<script type="text/javascript" charset="utf-8" src="../../lib/exe/js.php.t.bootstrap3.js"></script>
<!--<![endif]-->

    <script type="text/javascript">
    //<![CDATA[ 
    function LoadScript( url )
    {
     document.write( '<scr' + 'ipt type="text/javascript" src="../..//url"><\/scr' + 'ipt>' ) ;        

    }
   function LoadScriptDefer( url )
    {
     document.write( '<scr' + 'ipt type="text/javascript" src="../..//url" defer><\/scr' + 'ipt>' ) ;        

    }
//]]> 

 </script>
</head>
<body>
<div class="dokuwiki export">



<h1 class="sectionedit1" id="linux">Linux</h1>
<div class="level1">

</div>

<h4 id="bit_ubuntudebian_distributions">32/64 bit Ubuntu/Debian Distributions</h4>
<div class="level4">

</div>

<h4 id="bit_fedoracent_os">32/64 bit Fedora / Cent OS</h4>
<div class="level4">

<p>
<br/>

If you are installing OpenCPN for the first time on a computer with Ubuntu, or any other Linux flavor, you have to go through a few steps to make sure that all dependencies are met. Ubuntu uses “deb” packages and Fedora uses the “rpm” packages.
</p>
<ul>
<li class="level1"><div class="li"> For Debian based Linuxes: <strong>Make sure that you belong to the “dialout” group.</strong>  To find out, run the “$groups” command. If you&#039;re not in “dialout”, add yourself with the command <strong>“$sudo usermod -a -G dialout $USER”</strong>. Check this straight away, it will save you from frustration later on. If there is a problem connecting the GPS to a physical port, such as /dev/ttyS0, the reason is probably that you don&#039;t belong to “dialout”.</div>
</li>
<li class="level1"><div class="li"> For other Linux distributions, replace “dialout” above, with the result of this command: $stat -c %G /dev/ttyS0</div>
</li>
<li class="level1"><div class="li"> <strong>It is recommended that you install the “xcalib” program, that is necessary to dim the screen for night time usage.</strong>  Use your favourite package manager or just issue <em>$sudo apt-get install xcalib </em>from the command line (for debian based distros).</div>
</li>
<li class="level1"><div class="li"> <strong>It is recommended that you install the “xdg-utils” program, that helps the grib plugin compose a SailDoc grib-request-mail.</strong>  Use your favourite package manager or just issue <em>$sudo apt-get install xdg-utils </em>from the command line (for debian based distros).</div>
</li>
<li class="level1"><div class="li"> On Ubuntu, start “System→Administration→Synaptic”. In Synaptic  go to “Settings→Repositories” and tick the box “Community-maintained Open Source software (universe)”. Close Synaptic.</div>
</li>
<li class="level1"><div class="li"> Download the correct .deb or .rpm from <a href="http://opencpn.org/download" class="urlextern" title="http://opencpn.org/download" rel="nofollow">Download OpenCPN</a>.</div>
</li>
<li class="level1"><div class="li"> For Ubuntu, only use the download with an Ubuntu version number if you have exactly that version. Otherwise use the link “<a href="https://launchpad.net/~opencpn/+archive/opencpn" class="urlextern" title="https://launchpad.net/~opencpn/+archive/opencpn" rel="nofollow">Download </a>OpenCPN 3.X.X for all other *Ubuntu&#039;s”.</div>
</li>
<li class="level1"><div class="li"> Use the stable release for navigation en route, or if you just started using OpenCPN.</div>
</li>
<li class="level1"><div class="li"> Click on the downloaded package. An installation manager will guide you on most Linux distributions. All dependencies should automatically be installed. <strong>For most Linux installations, this is all you have to do.</strong>  Consult the following 3 paragraphs if you run into trouble.</div>
</li>
<li class="level1"><div class="li"> If you have problems with dependencies, run the recommended command line in the next paragraph. First check that you really have downloaded the correct version of OpenCPN. se above.</div>
</li>
<li class="level1"><div class="li"> sudo gdebi</div>
</li>
</ul>

<p>
 &lt;downloaded_opencpn_file.deb&gt;. The command “gdebi” will automatically install the dependencies for you.
</p>
<ul>
<li class="level1"><div class="li"> It is also possible to install the package via dpkg or rpm, on the condition that all dependencies are met. To make sure that this is the case on <strong>Ubuntu</strong>, open a terminal window to get a command line, (Applications→Accessories→Terminal) and copy and paste the following line:</div>
</li>
</ul>
<pre class="code">sudo apt-get install libwxgtk2.8-0 libwxbase2.8-0 wx-common libglu1-mesa libgl1-mesa-glx zlib1g bzip2 gpsd gpsd-clients xcalib xdg-utils libportaudio2 libkml0 libtinyxml2.6.2 liburiparser1 zlib1g libexpat1</pre>

<p>
Then proceed with the commands below.
</p>
<ul>
<li class="level1"><div class="li"> For Ubuntu: $ sudo dpkg -i &lt;downloaded_file.deb <br/>
For Fedora: # sudo yum install –nogpgcheck &lt;downloaded_file.rpm&gt;</div>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> The binary will be installed to <strong>/</strong><strong>usr/bin/opencpn</strong>  and the static data used by the program will be in <strong>/usr/share/opencpn  </strong></div>
</li>
<li class="level3"><div class="li"> If this is a new installation, click on the Options icon <img src="../../opencpn/manual/settings.h.32_tok.90bb99_w.32.jpg" class="media" alt="" width="32" height="32" />and configure your GPS source, chart directories, and other settings.</div>
</li>
<li class="level3"><div class="li"> <strong>If there is a problem with sound</strong>, make sure that you, as a user, belongs to the “audio” group. To find out, run the “$groups” command. If you&#039;re not in “audio”, add yourself with “$sudo usermod -a -G audio $USER”</div>
</li>
<li class="level3"><div class="li"> If you are running Debian Squeeze and want to install OpenCPN from the distributions .deb package, you will need to install with something like this in order to satisfy install dependencies related to libtinyxml: <br/>
$sudo dpkg -i –force-depends opencpn_3.1.1327-1_i386.deb</div>
</li>
</ul>

</div>
<!-- EDIT1 SECTION "Linux" [19-4115] -->
<h2 class="sectionedit2" id="using_linux_repositories_an_easier_way_to_install_and_update">Using Linux repositories, an easier way to install and update.</h2>
<div class="level2">

<p>
Installing in a different, easy way.
</p>

</div>

<h4 id="installing_on_ubuntu">Installing on Ubuntu</h4>
<div class="level4">

<p>
Add the OpenCPN ppa repository as explained in <em>configuring <a href="ubuntu_ppa.html" class="wikilink1" title="opencpn:opencpn_user_manual:getting_started:opencpn_installation:ubuntu_ppa">Ubuntu PPA</a></em> <br/>

- If you are using Synaptic, add the repository, reload the software sources as it suggests, search for and install opencpn<br/>

- No need to install anything manually
</p>

</div>

<h4 id="other_32_64bits_the_armhf_architecture_linux_distributions_and_the_bsd_operating_systems">Other 32, 64bits, the armhf architecture, Linux Distributions and the BSD operating systems</h4>
<div class="level4">
<ul>
<li class="level1"><div class="li"> Currently other distributions requires compiling the source. This will involve resolving various dependencies and is for folks comfortable with developing on Linux.</div>
</li>
<li class="level1"><div class="li"> Interested in maintaining a package for your favorite Linux distribution? Follow the SourceForge link above.</div>
</li>
<li class="level1"><div class="li"> This also includes the different BSD distributions. Report your experiences back to the forum.</div>
</li>
</ul>

</div>

<h4 id="opensuse_notes">openSUSE notes</h4>
<div class="level4">

<p>
Starting with openSUSE 11.4 and onwards, wxWidgets framework is shipped in several mutually exclusive flavors — “STL”, “noSTL” (“wxContainer”), “ANSI”, — of which OpenCPN is only compatible with “<strong>noSTL</strong>” (“<strong>wxContainer</strong>”) flavor.
</p>
<ul>
<li class="level1"><div class="li"> Older versions of OpenCPN support wxWidgets 2.8, which does not have a “default” flavor in openSUSE, and of which any flavor may be installed alongside with each other, but OpenCPN stricly requires “<strong>wxContainer</strong>”.</div>
</li>
<li class="level1"><div class="li"> Modern versions of OpenCPN, starting with beta branch 4.5, use functionality that is only available in wxWidgets 2.9, but since that branch is not packaged by openSUSE maintainers, then wxWidgets 3.0 becomes a must. That one defaults to “STL” flavor, which is not appropriate for OpenCPN and will result in multitude of mysterious compilation errors if used, — OpenCPN requires “<strong>noSTL</strong>”.</div>
</li>
</ul>

<p>
To install the required wxWidgets 3.0, use the following command:
</p>
<pre class="code">sudo zypper install wxWidgets-3_0-nostl-devel</pre>

<p>
For legacy OpenCPN builds against the older wxWidgets 2.8, some virtual wx libraries (with no real content) must also be installed in addition to real-deal wx libraries themselves:
</p>
<pre class="code">sudo zypper install wxWidgets-wxcontainer-compat-lib-config libwx_baseu-2_8-0-compat-lib-wxcontainer libwx_baseu_net-2_8-0-compat-lib-wxcontainer libwx_baseu_xml-2_8-0-compat-lib-wxcontainer libwx_gtk2u_adv-2_8-0-compat-lib-wxcontainer libwx_gtk2u_aui-2_8-0-compat-lib-wxcontainer libwx_gtk2u_core-2_8-0-compat-lib-wxcontainer libwx_gtk2u_gl-2_8-0-compat-lib-wxcontainer libwx_gtk2u_html-2_8-0-compat-lib-wxcontainer</pre>

<p>
The above commands will also automatically trigger installation of underlying real-deal libraries and other dependencies if they were not present before.
</p>

</div>
<!-- EDIT2 SECTION "Using Linux repositories, an easier way to install and update." [4116-] -->
<!-- no cachefile used, but created /var/www/html/dokuwiki/data/cache/e/ebb9d019be707dc4afd9b1ddd683e8d2.xhtml -->
</div>
</body>
</html>
